package com.hqully.smartfumehood.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hqully.smartfumehood.common.vo.QueryVo;
import com.hqully.smartfumehood.entity.FumeHood;
import com.hqully.smartfumehood.service.FumeHoodService;
import com.hqully.smartfumehood.mapper.FumeHoodMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author ZH.ming
* @description 针对表【fume_hood】的数据库操作Service实现
* @createDate 2022-06-27 10:56:27
*/
@Service
public class FumeHoodServiceImpl extends ServiceImpl<FumeHoodMapper, FumeHood>
    implements FumeHoodService{

    @Autowired
    private FumeHoodMapper fumeHoodMapper  ;

    @Override
    public PageInfo<FumeHood> findAllFumeHood(QueryVo queryVo) {
     PageHelper.startPage(queryVo.getPageNum(),queryVo.getPageSize(),true);

     List<FumeHood> fumeHoodList = fumeHoodMapper.findAllFumeHood(queryVo.getQuery());

     PageInfo<FumeHood> fumeHoodPageInfo = new PageInfo<>(fumeHoodList);

     return fumeHoodPageInfo;
    }
}




